package io.renren.modules.bookManagement.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.renren.common.service.impl.CrudServiceImpl;
import io.renren.modules.bookManagement.dao.UsertableDao;
import io.renren.modules.bookManagement.dto.UsertableDTO;
import io.renren.modules.bookManagement.entity.UsertableEntity;
import io.renren.modules.bookManagement.service.UsertableService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * 用户表
 *
 * @author Mark sunlightcs@gmail.com
 * @since 1.0.0 2022-12-10
 */
@Service
public class UsertableServiceImpl extends CrudServiceImpl<UsertableDao, UsertableEntity, UsertableDTO> implements UsertableService {

    @Override
    public QueryWrapper<UsertableEntity> getWrapper(Map<String, Object> params){
        String id = (String)params.get("id");

        QueryWrapper<UsertableEntity> wrapper = new QueryWrapper<>();
        wrapper.eq(StringUtils.isNotBlank(id), "id", id);

        return wrapper;
    }


}